﻿using BBICMS.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace BBICMS.Model.Works
{
    public partial class WorkType : AuditableEntity<int>
    {           
     
        [Display(Name = "分类名称")]
        [Required(ErrorMessage = "请输入分类名称")]
        public string Title { get; set; }
        [Display(Name = "描述")]
        public string Description { get; set; }

        [Display(Name = "排序")]
        [Required(ErrorMessage = "请输入排序")]
        [RegularExpression(@"^-?\d*$", ErrorMessage = "格式不正确")]
        public int Importance { get; set; }
       // public string ImageUrl { get; set; }
        [Display(Name = "激活")]
        public bool Active { get; set; }
      
        public virtual ICollection<Work> Works { get; set; }
        public WorkType()
        {
            this.Works = new HashSet<Work>();
        }
    }
}
